<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>搜索</title>
<meta name="keywords"  content="KEYWORDS..." />
<meta name="description" content="DESCRIPTION..." />
<meta name="author" content="DeathGhost" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name='apple-touch-fullscreen' content='yes'>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="address=no">
<link rel="icon" href="/1/images/icon/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/1/images/icon/apple-touch-icon-57x57-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/1/images/icon/apple-touch-icon-120x120-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="196x196" href="/1/images/icon/apple-touch-icon-196x196-precomposed.png">
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="/1/css/style.css" />
<script src="/1/js/jquery.js"></script>
<script src="/vendor/layer/layer.js"></script>
</head>
<body>
<!--header-->
<header>
 <a href="javascript:history.go(-1);" class="iconfont backIcon">&#60;</a>
 <h1>修改密码</h1>
</header>
<div style="height:1rem;"></div>
<ul class="userForm">
 <li>
 <label class="formName">旧密码：</label>
 <input type="password" id="password" required placeholder="请输入旧密码"/>
 </li>
 <li>
 <label class="formName">新密码：</label>
 <input type="password" id="new_password" required placeholder="至少是6位的字母数字组合"/>
 </li>
 <li>
 <label class="formName">确认新密码：</label>
 <input type="password" id="re_password" required placeholder="确认新密码"/>
 </li>
 <li><input type="button" value="确认修改密码" class="formLastBtn" onclick="saveData()"/></li>
</ul>
<script>
    function saveData() {
        $.post('', {
            password: $('#password').val(),
            new_password: $('#new_password').val(),
            re_password: $('#re_password').val()
        }, function (res) {
            if (res.status === 1) {
                layer.msg(res.info, {time: 1200}, function () {
                    location.href=document.referrer;
                });
            } else {
                layer.msg(res.info, {time: 1500});
            }
        });
    }
</script>
</body>
</html>
